package asimes.util;

import java.util.LinkedList;
import java.util.List;
import java.util.Objects;


/**
 * Created by Asimes on 2016/9/19.
 */
public class StdOut {

    public static void print(String s){
        System.out.println(s);
    }

    public static void print(int s){
        System.out.println(s);
    }

    public static void print(boolean s){
        System.out.println(s);
    }

    public static void print(short s){
        System.out.println(s);
    }

    public static void print(long s){
        System.out.println(s);
    }

    public static void print(char s){
        System.out.println(s);
    }
    public static void print(float s){
        System.out.println(s);
    }

    public static void print(double s){
        System.out.println(s);
    }

    public static void print(Objects s){
        System.out.println(s.toString());
    }

    public static void print(int[] arr){
        System.out.print("[");
        for (int i = 0; i < arr.length - 1; i++) {
            System.out.print(arr[i] + ",");
        }
        System.out.print(arr[arr.length-1]);
        System.out.println("]");

    }

    public static void print(List list){
        int size = list.size();
        System.out.print("[");
        for (int i = 0; i < size-1; i++) {
            System.out.print(list.get(i) + ",");
        }
        System.out.print(list.get(size-1));
        System.out.println("]");

    }



    public static void print(Object[] arr){
        System.out.print("[");
        for (int i = 0; i < arr.length - 1; i++) {
            System.out.print(arr[i] + ",");
        }
        System.out.print(arr[arr.length-1]);
        System.out.println("]");

    }

    public static void main(String[] args) {
        List<String> list = new LinkedList<>();
        list.add("AA");
        list.add("vsd");
        list.add("34");
        print(list);
    }

}
